﻿#ifndef _COUPLER_H
#define _COUPLER_H

#ifdef _MSC_VER
#pragma comment(lib, "coupler/coupler.lib")  // -Lcoupler -lcoupler
// #ifdef _MSC_VER
#endif

#include <Windows.h>

#ifdef __cplusplus
extern "C" {
// #ifdef __cplusplus
#endif

#define DECLSPEC_IMPORT __declspec(dllimport)

DECLSPEC_IMPORT int APIENTRY Api_Initialize(int session, LPCSTR jsonStr);

DECLSPEC_IMPORT int APIENTRY Api_SendTextMsg(int auth_code, LPCSTR robot_wxid, LPCSTR to_wxid, LPCSTR msg);

DECLSPEC_IMPORT int APIENTRY Api_SendTextMsgByteHex(int auth_code, LPCSTR robot_wxid, LPCSTR to_wxid,
                                                    LPCSTR byte_hex);

DECLSPEC_IMPORT int APIENTRY Api_SendGroupMsgAndAt(int auth_code, LPCSTR robot_wxid, LPCSTR group_wxid,
                                                   LPCSTR member_wxid, LPCSTR member_name, LPCSTR msg);

DECLSPEC_IMPORT int APIENTRY Api_SendCardMsg(int auth_code, LPCSTR robot_wxid, LPCSTR to_wxid,
                                             LPCSTR card_data);

DECLSPEC_IMPORT int APIENTRY Api_SendImageMsg(int auth_code, LPCSTR robot_wxid, LPCSTR to_wxid, LPCSTR path);

DECLSPEC_IMPORT int APIENTRY Api_SendFileMsg(int auth_code, LPCSTR robot_wxid, LPCSTR to_wxid, LPCSTR path);

DECLSPEC_IMPORT int APIENTRY Api_SendEmojiMsg(int auth_code, LPCSTR robot_wxid, LPCSTR to_wxid, LPCSTR path);

DECLSPEC_IMPORT int APIENTRY Api_SendVideoMsg(int auth_code, LPCSTR robot_wxid, LPCSTR to_wxid, LPCSTR path);

DECLSPEC_IMPORT int APIENTRY Api_SendLinkMsg(int auth_code, LPCSTR robot_wxid, LPCSTR to_wxid, LPCSTR title,
                                             LPCSTR text, LPCSTR target_url, LPCSTR pic_url, LPCSTR icon_url);

DECLSPEC_IMPORT int APIENTRY Api_SendMusicMsg(int auth_code, LPCSTR robot_wxid, LPCSTR to_wxid, LPCSTR name,
                                              int type);

DECLSPEC_IMPORT LPCSTR APIENTRY Api_GetRobotName(int auth_code, LPCSTR robot_wxid);

DECLSPEC_IMPORT LPCSTR APIENTRY Api_GetRobotHeadimgurl(int auth_code, LPCSTR robot_wxid);

DECLSPEC_IMPORT LPCSTR APIENTRY Api_GetLoggedAccountList(int auth_code);

DECLSPEC_IMPORT LPCSTR APIENTRY Api_GetFriendList(int auth_code, LPCSTR robot_wxid, BOOL is_refresh);

DECLSPEC_IMPORT LPCSTR APIENTRY Api_GetGroupList(int auth_code, LPCSTR robot_wxid, BOOL is_refresh);

DECLSPEC_IMPORT LPCSTR APIENTRY Api_GetGroupMemberList(int auth_code, LPCSTR robot_wxid, LPCSTR group_wxid,
                                                       BOOL is_refresh);

DECLSPEC_IMPORT LPCSTR APIENTRY Api_GetGroupMemberDetailInfo(int auth_code, LPCSTR robot_wxid,
                                                             LPCSTR group_wxid, LPCSTR member_wxid,
                                                             BOOL is_refresh);

DECLSPEC_IMPORT int APIENTRY Api_ReloadPlug(int auth_code);

DECLSPEC_IMPORT int APIENTRY Api_DeleteFriend(int auth_code, LPCSTR robot_wxid, LPCSTR friend_wxid);

DECLSPEC_IMPORT int APIENTRY Api_ModifyFriendNote(int auth_code, LPCSTR robot_wxid, LPCSTR friend_wxid,
                                                  LPCSTR note);

DECLSPEC_IMPORT int APIENTRY Api_BuildingGroup(int auth_code, LPCSTR robot_wxid, LPCSTR friends);

DECLSPEC_IMPORT int APIENTRY Api_ModifyGroupName(int auth_code, LPCSTR robot_wxid, LPCSTR group_wxid,
                                                 LPCSTR group_name);

DECLSPEC_IMPORT int APIENTRY Api_ModifyGroupNotice(int auth_code, LPCSTR robot_wxid, LPCSTR group_wxid,
                                                   LPCSTR content);

DECLSPEC_IMPORT int APIENTRY Api_QuitGroup(int auth_code, LPCSTR robot_wxid, LPCSTR group_wxid);

DECLSPEC_IMPORT int APIENTRY Api_RemoveGroupMember(int auth_code, LPCSTR robot_wxid, LPCSTR group_wxid,
                                                   LPCSTR member_wxid);

DECLSPEC_IMPORT int APIENTRY Api_InviteInGroup(int auth_code, LPCSTR robot_wxid, LPCSTR group_wxid,
                                               LPCSTR friend_wxid);

DECLSPEC_IMPORT int APIENTRY Api_AcceptTransfer(int auth_code, LPCSTR robot_wxid, LPCSTR from_wxid,
                                                LPCSTR json_msg);

DECLSPEC_IMPORT int APIENTRY Api_AgreeFriendVerify(int auth_code, LPCSTR robot_wxid, LPCSTR json_msg);

DECLSPEC_IMPORT int APIENTRY Api_AgreeGroupInvite(int auth_code, LPCSTR robot_wxid, LPCSTR json_msg);

DECLSPEC_IMPORT LPCSTR APIENTRY Api_GetAppDirectory(int auth_code);

DECLSPEC_IMPORT int APIENTRY Api_AppendLogs(int auth_code, LPCSTR msg1);

DECLSPEC_IMPORT int APIENTRY Api_SetFatal(int auth_code);

#ifdef __cplusplus
}
// #ifdef __cplusplus
#endif

// #ifndef _COUPLER_H
#endif
